using DA.AnimGraph;
using UnityEngine.UIElements;

namespace DA.AnimGraph.Editor {

    internal class InspectorField_String : InspectorField<RefField<string>> {

        TextField textField;

        protected override void BuildUI() {
            textField = new TextField(labelText);
            textField.value = source.value;
            textField.RegisterValueChangedCallback(evt => {
                source.value = evt.newValue;
                inspectorChangeCallback?.Invoke();
            });
        }

        protected override void DrawUI() {
            Add(textField);
        }

    }

}
